package com.itheima.service;

import com.itheima.dao.OtherPersonDao;
import com.itheima.dao.PersonDao;

import java.util.Scanner;

public class PersonService {
    Scanner sc = new Scanner(System.in);
    OtherPersonDao sd = new OtherPersonDao();
    public int checkId(){
        int exist ;
        while(true){
            String nextSid = sc.next();
            exist = sd.isExist(nextSid);
            if(exist<0){
                System.out.println("输入的身份码不存在，请重新输入：");
            }else{
                break;
            }
        }
        return exist;
    }

}
